
import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */

public class main3 {
    public static void feb(int b) {
        String by="";
        int sum = 1;
        for (int a=0;a<b;a++) {
            for (int n = 0; n <= a; n++) {
                sum = 1;
                for (int m = 1; m <= n; m++) {
                    double d = a + 1 - m;
                    sum *= d / m;
                }
                by = by + sum + " ";
            }
            String[] str = by.split(" ");
            System.out.println(Arrays.toString(str));
        }
    }
    public static void main(String[] args)
    {
        Scanner in=new Scanner(System.in);
        int  a=in.nextInt();
        // System.out.println(a);
        feb(a);

    }
}